<template>
    <p>{{msg}} <<===第二个 组件 ===>>动态路由参数={{$route.params.id}}={{$route.params.age}}</p>
</template>

<script>
    export default{
        data:function(){
            return{
                msg:"测试组件"
            }
        },
        watch: {
            '$route' (to, from) {
               console.log(to)
                console.log(from)
            }
        }
    }
</script>

<style>
    p{
        font-size: 14px;
        color: red;
    }
</style>